﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Configuration;

namespace FaithCMS.Admin
{
    public partial class AdminNews : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //Initialize the article submit button's click event
            ArticleSubmit.Click += new EventHandler(ArticleSubmit_Click);
        }

        void ArticleSubmit_Click(object sender, EventArgs e)
        {
            //TODO: Add textbox validation code

            //Add the article (note: update last parameter to be the text property of the text textbox once that control is added)
            DatabaseManipulation.CallAddArticle(ArticleTitle.Text, Author.Text, PublishDate.Text, "This is very cool.");
        }
    }
}